<template>
    <div>
        <!-- <h2 v-show="isShow">dadaa</h2> -->
        <h2 v-if="isShow">dadaa</h2>
        <h2 v-else>dwaaw</h2>
        <button @click="toggle">显示隐藏</button>
    </div>
</template>

<script setup>
import { ref } from 'vue'
    const isShow = ref(true)
    const toggle = () => {
        isShow.value = !isShow.value
    }
</script>

<style lang="scss" scoped>

</style>